<style>
    .tableContent {
        border:1px solid black;
    }
    .tableTitle >th {
        border:1px solid black;
        text-align:center;
    }
</style>
<style media="print">/*打印机去掉页眉页脚*/
    @page {
        size: auto;  /* auto is the initial value */
        margin: 0px; /* this affects the margin in the printer settings */
    }
</style>
<form id="xh_form">
    <div id="print_content" style="width: 100%">
        <div align="center">
            <table style="width: 80%">
                <tr style="margin-bottom: 40px;margin-top: 60px;">
                    <th colspan="8" style="text-align: center;font-size: 20px;height: 80px;">
                        销售单
                    </th>
                </tr>
                <tr>
                    <td align="right"><b>单据日期：</b></td>
                    <td colspan="2">{{ date }}</td>
                    <td align="right"><b>单据编号：</b></td>
                    <td colspan="2">{{ printId }}</td>
                    <td align="right"><b>仓库：</b></td>
                    <td>仓库</td>
                </tr>
                <tr>
                    <td align="right"><b>客户：</b></td>
                    <td colspan="2">{{ school }}</td>
                    <td align="right"><b>部门：</b></td>
                    <td colspan="2">{{ depName }}</td>
                    <td align="right"><b>经手人：</b></td>
                    <td>{{ userName }}</td>
                </tr>
                {% if data is not empty %}
                    <tr class="tableContent tableTitle">
                        <th style="width: 14%">货存编号</th>
                        <th style="width: 14%">货存名称</th>
                        <th style="width: 14%">规格型号</th>
                        <th style="width: 14%">计量单位</th>
                        <th style="width: 14%">数量</th>
                        <th style="width: 14%">售价</th>
                        <th colspan="2">销售金额</th>
                    </tr>
                    {% for row in data %}
                        <tr class="tableContent">
                            <td class="tableContent">{{ row['id'] }}</td>
                            <td class="tableContent">{{ row['name'] }}</td>
                            <td class="tableContent">{{ row['model'] }}</td>
                            <td class="tableContent">{{ row['measure'] }}</td>
                            <td class="tableContent" align="right">{{ row['num'] }}</td>
                            <td class="tableContent" align="right">{{ row['price'] }}</td>
                            <td colspan="2" class="tableContent" align="right">{{ row['allPrice'] }}</td>
                        </tr>
                    {% endfor %}
                {% endif %}
                <tr>
                    <td align="right"><b>备注：</b></td>
                    <td id="remark" colspan="7"></td>
                </tr>
                <tr>
                    <td align="right"><b>制单人：</b></td>
                    <td colspan="2">{{ printer }}</td>
                    <td align="right"><b>审核人：</b></td>
                    <td colspan="3">{{ printer }}</td>
                </tr>
                <tr>
                    <td align="right"><b>打印日期：</b></td>
                    <td colspan="2">{{ date }}</td>
                    <td align="right"><b>打印人：</b></td>
                    <td colspan="3">{{ printer }}</td>
                </tr>
            </table>
        </div>
    </div>
    <div class="no-print" style="width: 100%;padding-top: 50px">
        <div style="border-top:1px dashed black;width: 100%;padding-left: 10%;padding-bottom: 5px;font-size: 8px;color: red">(此区域内容将不会被打印)</div>
        <div style="width: 100%">
            <label style="float: left;padding-left: 10%;padding-top: 5px">填写备注：</label>
            <label style="float: left;width: 30%"><input id="remarkData" class="form-control" placeholder="选填" autocomplete="off" ></label>
            <label style="float: left;padding-left: 10px;padding-top: 1px"><a id="addRemark" class="btn btn-sm btn-success btn-default" style="display: table-cell;">添加到打印单</a></label>
        </div>
    </div>
</form>